The SQL Expression Editor is added to the Field Explorer when you create a report based ODBC data source. The Editor also appears when you choose the SQL Expression Field command from the Insert menu.
Use the SQL Expression Editor to create and edit SQL expressions that can be used in your reports. You can use:
The SQL Expression Editor is used to combine these components into SQL expressions. The SQL Expression Editor allows you to type the components into the SQL expression directly, or, in the case of fields, functions, operators, group field values, and formulas, to select them from lists of those items that are available.
The SQL Expression Editor requires you to enter the various components according to a specific set of rules called syntax. Some examples of rules:
The SQL Expression Editor checks the syntax and helps you debug (fix) problems before you enter the SQL expression field into the report.
You build and edit your SQL expression in the large white SQL Expression box. There are a number of ways you can work with SQL expressions here:
Click this button to create a new SQL expression field without leaving the SQL Expression Editor.
After you click New, the SQL Expression Name dialog box appears. Type in a name, click OK, and you are returned to the SQL Expression Editor with the name of your new SQL expression present in the Name list.
Click Save to save the SQL expression you created.
Click Save and close to save the SQL expression you created and then close the SQL Expression Editor. After clicking Save and close, you are returned to the Field Explorer.
Use this button to test the syntax of your SQL expression and identify syntax errors (if they are any). Check is useful for interim syntax checks while you are building an SQL expression.
The Name list shows all the SQL expression fields created for the report you are currently working on.
Click Undo to undo the last action performed in the SQL Expression Editor. For example, if you accidentally deleted a part of your SQL expression, you can recover it by clicking Undo.
Click Redo to have the program redo the last action.
This button lets you review values for the selected field and paste individual values directly into your SQL expression. When you select a field from the Fields Tree box and then click Browse Data, a dialog box appears with a scroll box listing the values for the selected field. The Browse Data dialog box shows:
To paste a field value directly into your SQL expression, select the value and click Paste Data (or double
Use Find/Replace to search the SQL Expression Editor for a specified word, number, or text string.
Use Toggle Bookmark to insert a bookmark at the beginning of a selected SQL expression line. After clicking Toggle Bookmark, a blue dot appears at the beginning of the selected SQL expression line.
To remove a single bookmark, position the insertion point in the line of text marked with a bookmark and click Toggle Bookmark. The blue dot disappears from the gray column left of the text line, indicating that the line is not bookmarked.
Bookmarks make it easy to navigate through long SQL expressions, allowing you to write and edit complex SQL expressions efficiently. For example, bookmarks can be used to mark:
Use Next Bookmark to jump between bookmarks in the SQL Expression Editor.
Use Previous Bookmark to jump back to the previous bookmark.
Use Clear All Bookmarks to delete all bookmarks in the current SQL expression.
Use Sort Trees to arrange all fields, functions, and operators in the trees in an alphabetical list.
The Fields Tree contains all the fields you can use in your SQL expressions. By default, Field Tree is activated, allowing you to view field options for your SQL expression. To hide the Field Tree, click the Field Tree button.
The Function tree contains all the functions you can use in your SQL expression. By default, the Function Tree button is activated, allowing you to view function options for your SQL expression. To hide the Function tree, click the Function Tree button.
The Operator Tree contains all the operators you can use in your SQL expression. By default, the Operator Tree button is activated, allowing you to view operator options for your SQL expression. To hide the Operator Tree, click the Operator Tree button.
Click Help to view on
This box displays a list of those fields that are available for use in your SQL expressions. You can resize, move, and anchor the Field Tree box, as needed.
This box displays a list of functions available for use in the SQL expression. When you select a function from the list, the program inserts it in the SQL expression at the insertion point To make your work easier, the function is inserted complete with its required syntax items (parentheses, commas, quotation marks, and so on) and the insertion point is moved to the point where you need to enter the first argument (if arguments are required).
You can resize, move, and anchor the Function Tree box, as needed.
This box displays a list of operators available for use in the SQL expression. When you select an operator from the list, the program inserts it in the SQL expression at the insertion point.
You can resize, move, and anchor the Operator Tree box, as needed.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |